package com.shux.usermanager.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.shux.common.dao.impl.BaseBeanDaoImpl;
import com.shux.usermanager.dao.ISysRoleDao;
import com.shux.usermanager.entity.SysRole;
import com.shux.utils.page.PageData;

/**
 **********************************************
 *  描述：
 * Simba.Hua
 * 2017年6月18日
 **********************************************
**/
@Repository("sysRoleDao")
public class SysRoleDaoImpl extends BaseBeanDaoImpl<SysRole> implements ISysRoleDao {
    private final static String workspacename = "com.shux.usermanager.dao.SysRoleMapper";
    @Override
    public String getWorkSpaceName() {
        return workspacename;
    }
    
    public SysRole loadSysRole(String roleId) throws Exception{
        PageData pd = new PageData();
        pd.put("roleId", roleId);
       return this.findForObject("loadSysRole", pd);
    }


    @Override
    public List<SysRole> queryAllRolesByParentId(PageData pageData) throws Exception {
        // TODO Auto-generated method stub
        return this.findForList("queryAllRolesByParentId", pageData);
    }


}
